<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Cache-Control" content="no-cache, no-store" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文件</title>
<link href="__CSS__public.css" rel="stylesheet" type="text/css" />
<link href="/testxu/css/<?php echo ($css); ?>.css" rel="stylesheet" type="text/css" />

<script src="__JS__jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="__JS__jquery.validate.js" type="text/javascript"></script>
<script src="__JS__kindeditor/kindeditor.js" type="text/javascript"></script>
<script src="__JS__cal.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
	var validator = $('#addtoy').validate({
		rules: {
			name: {
				required: true,
			},
			company: {
				required: true,
			},
			date: {
				required: true,
				dateISO:true,
			},
			keywords: {
				required: true,
			},
			price: {
				required: true,
				number:true,
			},
			intro: {
				required: true,
			},
			views: {
				digits: true,
			},
			editnum: {
				digits: true,
			}
		},
		messages: {
			name: {
				required: "请输入玩具名",
			},
			company: {
				required: "请输入玩具发行公司",
			},
			date: {
				required: "请输入发行日期",
				dateISO: "格式不正确。例如：2009-10-10",
			},
			keywords: {
				required: "请输入关键字，用,分割。",
			},
			price: {
				required: "请输入价格",
				number: "格式不正确。例如：600.00，不要加单位",
			},
			intro: {
				required: "请输入内容",
			},
			views: {
				digits: "格式不正确，只能输入正整数",
			},
			editnum: {
				digits: "格式不正确，只能输入正整数",
			}
		},
	});

	$('#date').simpleDatepicker({startdate: 1980, enddate: 2020, x:0, y:25});

});

	KE.show({
		id : 'intro',
		resizeMode : 2,
		allowUpload : true,
		items : ['fontsize', 'textcolor', 'bold', '|', 'insertorderedlist', 'insertunorderedlist', '|', 'image', 'link']
	});
</script>
</head>

<body>
<div id="warp">
  <div id="titleBar">添加模型</div>
  <div class="btnBar">
    <input type="button" value="返回" onclick="window.history.go(-1)" />
  </div>
  <form action="__URL__/insert" method="post" id="addtoy">
    <table width="100%" border="1" cellspacing="1" cellpadding="0" class="input">
      <tr>
        <td width="10%">模型名</td>
        <td><input name="name" type="text" id="name" size="50" />
          <span class="status"></span></td>
        <td width="10%">所在分类</td>
        <td><select name="cid" id="cid">
            <option value="1">选择分类</option>
          </select>
          <span class="status"></span></td>
      </tr>
      <tr>
        <td width="10%">发行公司</td>
        <td width="30%"><input name="company" type="text" id="company" size="50" />
          <span class="status"></span></td>
        <td width="10%">发行日期</td>
        <td><input name="date" type="text" id="date" />
          <span class="status"></span></td>
      </tr>
      <tr>
        <td>关键字</td>
        <td><input name="keywords" type="text" id="keywords" size="50" />
          <span class="status"></span></td>
        <td>发行价格</td>
        <td><input name="price" type="text" id="price" />
          <span class="status"></span></td>
      </tr>
      <tr>
        <td>模型介绍</td>
        <td colspan="3" class="richeditor"><textarea id="intro" name="intro" style="width:100%;height:280px;visibility:hidden;"></textarea>
          <span class="status"></span></td>
      </tr>
      <tr>
        <td>创建等级</td>
        <td colspan="3"><label>
            <input type="radio" name="level" id="level" value="1" checked="checked" />
            普通</label>
          <label>
            <input type="radio" name="level" id="level" value="2" />
            置顶</label></td>
      </tr>
      <tr>
        <td>创建状态</td>
        <td colspan="3"><label>
            <input type="radio" name="states" id="status" value="1" checked="checked" />
            正常</label>
          <label>
            <input type="radio" name="states" id="status" value="0" />
            锁定</label></td>
      </tr>
      <tr>
        <td>浏览次数</td>
        <td colspan="3"><input name="views" type="text" id="views" value="0" />
          <span class="status"></span></td>
      </tr>
      <tr>
        <td>更新次数</td>
        <td colspan="3"><input name="editnum" type="text" id="editnum" value="0" />
          <span class="status"></span></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td colspan="3"><input type="submit" name="button" id="button" value="保存" /></td>
      </tr>
    </table>
  </form>
</div>
</body>
</html>